package com.example.demo.bean.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * @author chengkang2
 */
public class PayMentNewVO {
	
	@JSONField(name="ID")
	@JsonProperty("ID")
	private String id;
	@JSONField(name="NickName")
	@JsonProperty("NickName")
	private String nickname;
	@JSONField(name="Ccowner")
	@JsonProperty("Ccowner")
	private String ccowner;
	@JSONField(name="DecryptNumber")
	@JsonProperty("DecryptNumber")
	private String decryptnumber;
	@JSONField(name="SubscriptionId")
	@JsonProperty("SubscriptionId")
	private String subscriptionid;
	@JSONField(name="Type")
	@JsonProperty("Type")
	private String type;
	@JSONField(name="ValidToYear")
	@JsonProperty("ValidToYear")
	private String validtoyear;
	@JSONField(name="ValidToMonth")
	@JsonProperty("ValidToMonth")
	private String validtomonth;
	@JSONField(name="IsDefaultPaymentInfo")
	@JsonProperty("IsDefaultPaymentInfo")
	private boolean isdefaultpaymentinfo;
	@JSONField(name="IsSubscriptionCard")
	@JsonProperty("IsSubscriptionCard")
	private boolean issubscriptioncard;
	
	@JSONField(name="Address")
	@JsonProperty("Address")
	private AddressVO address;

	@JSONField(name="PaymentType")
	@JsonProperty("PaymentType")
	private String paymenttype = "CARD";
	@JSONField(name="Is3dSecure")
	@JsonProperty("Is3dSecure")
	private boolean is3dsecure = false;
	@JSONField(name="IsTrustEv")
	@JsonProperty("IsTrustEv")
	private boolean istrustev = false;
	
	@JSONField(name="CidRespCode")
	@JsonProperty("CidRespCode")
	String cidRespCode;
	
	@JSONField(name="AvsCode")
	@JsonProperty("AvsCode")
	String avsCode;
	
	@JSONField(name="IsNewForPreauth")
	@JsonProperty("IsNewForPreauth")
	boolean newForPreauth; 
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getPaymenttype() {
		return paymenttype;
	}

	public void setPaymenttype(String paymenttype) {
		this.paymenttype = paymenttype;
	}

	public String getCcowner() {
		return ccowner;
	}

	public void setCcowner(String ccowner) {
		this.ccowner = ccowner;
	}

	public String getDecryptnumber() {
		return decryptnumber;
	}

	public void setDecryptnumber(String decryptnumber) {
		this.decryptnumber = decryptnumber;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getValidtomonth() {
		return validtomonth;
	}

	public void setValidtomonth(String validtomonth) {
		this.validtomonth = validtomonth;
	}

	public String getValidtoyear() {
		return validtoyear;
	}

	public void setValidtoyear(String validtoyear) {
		this.validtoyear = validtoyear;
	}

	public String getSubscriptionid() {
		return subscriptionid;
	}

	public void setSubscriptionid(String subscriptionid) {
		this.subscriptionid = subscriptionid;
	}

	public boolean isIsdefaultpaymentinfo() {
		return isdefaultpaymentinfo;
	}

	public void setIsdefaultpaymentinfo(boolean isdefaultpaymentinfo) {
		this.isdefaultpaymentinfo = isdefaultpaymentinfo;
	}

	public AddressVO getAddress() {
		return address;
	}

	public void setAddress(AddressVO address) {
		this.address = address;
	}

	public boolean isIssubscriptioncard() {
		return issubscriptioncard;
	}

	public void setIssubscriptioncard(boolean issubscriptioncard) {
		this.issubscriptioncard = issubscriptioncard;
	}

	public boolean isIs3dsecure() {
		return is3dsecure;
	}

	public void setIs3dsecure(boolean is3dsecure) {
		this.is3dsecure = is3dsecure;
	}

	public boolean isIstrustev() {
		return istrustev;
	}

	public void setIstrustev(boolean istrustev) {
		this.istrustev = istrustev;
	}
	
	public String getCidRespCode() {
		return cidRespCode;
	}

	public void setCidRespCode(String cidRespCode) {
		this.cidRespCode = cidRespCode;
	}

	public String getAvsCode() {
		return avsCode;
	}

	public void setAvsCode(String avsCode) {
		this.avsCode = avsCode;
	}

	public boolean isNewForPreauth() {
		return newForPreauth;
	}

	public void setNewForPreauth(boolean newForPreauth) {
		this.newForPreauth = newForPreauth;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ccowner == null) ? 0 : ccowner.hashCode());
		result = prime * result + ((subscriptionid == null) ? 0 : subscriptionid.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result + ((validtomonth == null) ? 0 : validtomonth.hashCode());
		result = prime * result + ((validtoyear == null) ? 0 : validtoyear.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PayMentNewVO other = (PayMentNewVO) obj;
		if (ccowner == null) {
			if (other.ccowner != null)
				return false;
		} else if (!ccowner.equals(other.ccowner))
			return false;
		if (subscriptionid == null) {
			if (other.subscriptionid != null)
				return false;
		} else if (!subscriptionid.equals(other.subscriptionid))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		if (validtomonth == null) {
			if (other.validtomonth != null)
				return false;
		} else if (!validtomonth.equals(other.validtomonth))
			return false;
		if (validtoyear == null) {
			if (other.validtoyear != null)
				return false;
		} else if (!validtoyear.equals(other.validtoyear))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "PayMent [id=" + id + ", nickname=" + nickname + ", ccowner=" + ccowner + ", decryptnumber=" + decryptnumber + ", subscriptionid=" + subscriptionid + ", type=" + type + ", validtoyear="
				+ validtoyear + ", validtomonth=" + validtomonth + ", isdefaultpaymentinfo=" + isdefaultpaymentinfo + ", issubscriptioncard=" + issubscriptioncard + ", address=" + address
				+ ", paymenttype=" + paymenttype + ", is3dsecure=" + is3dsecure + ", istrustev=" + istrustev + "]";
	}
}
